/*
 * ns3.h
 *
 *  Created on: 17 sept. 2013
 *      Author: the
 */

#ifndef NS3_H_
#define NS3_H_
#include "type.h"
#include "dessin.h"
#include "init.h"
#include "metric.h"
#include "tabu.h"
#include "anh.h"
#include "mcair.h"
#include "greedy.h"
#include "sameFrequency.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

//Global extern variables
extern int nbOfNodes;		//Number of nodes
extern struct node* nodes;	//Array with the nodes
extern int nbOfRadios;		//Number of radios per node
extern int maxFreq;		//Number of orthogonal frequencies
extern int algorithm;		//Algorithm number used to allocate the frequencies
extern float	L;		//Length of a side of the observation window (LxL)
extern float	R;		//Radio scope of the nodes
extern int ns3Version;		//1: ns-3.5 sans ECMP
			//2: ns-3.7.1 avec ECMP


int NS3file(int variantTopology, int nbOfRoutes, char* fileName);

void NS3header(FILE* ptrFile);
void NS3genereNoeuds(FILE* ptrFile);
void NS3simule(FILE* ptrFile);
void NS3defineMAC(FILE* ptrFile);
void NS3definePhyChannel(FILE* ptrFile);
void NS3nodesLocation(FILE* ptrFile);
void NS3interfacesAdresses(FILE* ptrFile, int nbOfRoutes);
void NS3staticRouting(FILE* ptrFile);
void NS3application(FILE* ptrFile, int source, int dest, int nbOfRoutes);
void NS3footer(FILE* ptrFile);



#endif /* NS3_H_ */
